<% if @article.errors.any? %>
    ui.dialog("<%= sanitize @article.errors.full_messages.join(', ') %>")
        .effect('scale').closable().show().hide(15000);
<% else %>
    window.history.replaceState({time:new Date().getTime()}, '', '<%= edit_backend_article_path(@article) %>');
    ui.dialog("保存成功!").closable().show().hide(3000);
    $('#toolkit .save')
            .removeClass().addClass('update')
            .html('<%= link_to i_with_span_text(%q{ Update}, %q{fa fa-refresh}), backend_article_path(@article) %>');
<% end %>